/**
* All Rights Reserved , Copyright (C) 2023 , 青岛鼎信通讯股份有限公司
*
* CbbPmTaskServiceAuto
* WBS任务表
*
* 修改纪录
* 2023-06-01 版本：1.0 hudeyong 创建。
* @version 版本：1.0
* @author 作者：hudeyong
* 创建日期：2023-06-01
*/

package com.topscomm.mis.cbb.pm.base.service.impl.auto;

import javax.annotation.Resource;
import com.topscomm.basic.IBasicDao;
import com.topscomm.tap.common.DatacodeCache;
import java.util.Map;
import com.topscomm.mis.cbb.pm.base.*;
import com.topscomm.mis.cbb.pm.base.pojo.CbbPmTaskEntity;
import com.topscomm.mis.cbb.pm.base.dao.ICbbPmTaskDao;


public class CbbPmTaskServiceAuto extends BaseService<CbbPmTaskEntity,ICbbPmTaskDao> {

	/**
	 * @author: hudeyong
	 * @date: 2023-06-01
	 * @param mapRow
	 * @description:设置字段显示值
	 * @modify:
	 */
	@Override
	public void setDispFields(Map<String, Object> mapRow, DatacodeCache datacodeCache) {
		String temp;
		if (mapRow.get("enabled") != null) {
			temp = mapRow.get("enabled").toString();
			mapRow.put("dispenabled", datacodeCache.getValueDynamic("CboYesNo", temp, "code", "name"));
		}
		if (mapRow.get("source") != null) {
			temp = mapRow.get("source").toString();
			mapRow.put("dispsource", datacodeCache.getValueDynamic("CbbPmTaskSource", temp, "code", "name"));
		}
		if (mapRow.get("status") != null) {
			temp = mapRow.get("status").toString();
			mapRow.put("dispstatus", datacodeCache.getValueDynamic("CbbPmTaskStatus", temp, "code", "name"));
		}
		if (mapRow.get("effectiveness") != null) {
			temp = mapRow.get("effectiveness").toString();
			mapRow.put("dispeffectiveness", datacodeCache.getValueDynamic("CbbPmTaskRunningState", temp, "code", "name"));
		}
		if (mapRow.get("type") != null) {
			temp = mapRow.get("type").toString();
			mapRow.put("disptype", datacodeCache.getValueDynamic("CbbPmTaskType", temp, "code", "name"));
		}
		if (mapRow.get("relation") != null) {
			temp = mapRow.get("relation").toString();
			mapRow.put("disprelation", datacodeCache.getValueDynamic("CbbPmTaskRelation", temp, "code", "name"));
		}
		if (mapRow.get("autocomplete") != null) {
			temp = mapRow.get("autocomplete").toString();
			mapRow.put("dispautocomplete", datacodeCache.getValueDynamic("CbbPmAutoComplete", temp, "code", "name"));
		}
		if (mapRow.get("derived") != null) {
			temp = mapRow.get("derived").toString();
			mapRow.put("dispderived", datacodeCache.getValueDynamic("CboYesNo", temp, "code", "name"));
		}
	}

	@Override
	@Resource(name = "cbbPmTaskDao")
	public void setDao(IBasicDao<CbbPmTaskEntity> dao) {
		super.setDao(dao);
	}
}
